#ifndef ARCSEGMENT_H
#define ARCSEGMENT_H

#include "tracksegment.h"

class ArcSegment : public TrackSegment
{
public:
    ArcSegment(QGraphicsItem* parent = nullptr);
    
    double length() const override;
    QPointF getPointAt(double distance) const override;
    double getAngleAt(double distance) const override;
    
    void updatePath() override;
    void setRadius(double radius) override;
    void setAngle(double angle) override;
    
    QPointF center() const { return m_center; }
    double radius() const { return m_radius; }
    double startAngle() const { return m_startAngle; }
    double spanAngle() const { return m_spanAngle; }
    
    void setCenter(const QPointF& center);
    void setCenter(qreal x, qreal y);
    void setStartAngle(double angle);
    void setSpanAngle(double angle);
    
private:
    QPointF m_center;
    double m_radius;
    double m_startAngle;
    double m_spanAngle;
};

#endif // ARCSEGMENT_H
